Skip to content
This repository was archived by the owner on Sep 5, 2025. It is now read-only.

feat: add support for both local instances and remote clusters#87

Merged
matthewmcneely merged 16 commits intomainfrom
matthewmcneely/add-support-for-both-local-and-remote-clusters
Apr 29, 2025
Merged

feat: add support for both local instances and remote clusters#87
matthewmcneely merged 16 commits intomainfrom
matthewmcneely/add-support-for-both-local-and-remote-clusters

Conversation

@matthewmcneely
Copy link
Contributor

Description

This PR reworks modusgraph to allow the creation of applications to use both the internal "engine"-based system as well as traditional Dgraph clusters.

I have kept the old API in place for backwards compatibility.

There are still a number of TODOs including an update of the CHANGELOG, but wanted to get this up for review ASAP. St

Checklist

  • Code compiles correctly and linting passes locally
  • For all code changes, an entry added to the CHANGELOG.md file describing and linking to
    this PR
  • Tests added for new functionality, or regression tests for bug fixes added as applicable

@matthewmcneely matthewmcneely requested review from a team and Copilot April 25, 2025 02:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for both local in-process database instances and remote Dgraph clusters by renaming and refactoring the package from modusdb to modusgraph while also introducing additional logging, GRPC server setup, and accompanying tests. Key changes include:

  • Renaming and reorganization of package and API functions to support dual deployment modes.
  • Introduction of new test files for insert, delete, and admin operations.
  • Enhancements in engine initialization and schema mutation functions with improved structured logging.

Reviewed Changes

Copilot reviewed 34 out of 35 changed files in this pull request and generated no comments.

Show a summary per file
File Description
insert_test.go Added tests for insertion (single/multiple) with unique constraint checks
engine.go Updated engine initialization with logger, new listener & GRPC server set up
delete_test.go Added tests to validate delete operations
config.go Updated configuration to support logger injection & package renaming
buf_server.go Introduced bufconn-based GRPC server implementation
All API files Renamed package from modusdb to modusgraph and updated references
README.md & CHANGELOG.md Updated branding and repository URLs accordingly
CONTRIBUTING.md Updated links to reflect new repository naming
admin_test.go Added tests for admin functions (DropData/DropAll, schema updates, etc.)
Files not reviewed (1)
  • go.mod: Language not supported
Comments suppressed due to low confidence (2)

README.md:25

  • There appears to be a typo in 'runnning'; it should be 'running'.
When runnning in-process, modusGraph internalizes Dgraph's server components, and data is written to a local

api_types.go:77

  • [nitpick] The change from 'WithNamespace' to 'WithNamespaceOLD' could be confusing; consider clarifying the intent or renaming for consistency.
func WithNamespaceOLD(ns uint64) ModusDbOption {

@matthewmcneely matthewmcneely force-pushed the matthewmcneely/add-support-for-both-local-and-remote-clusters branch from 807e879 to 1072a7d Compare April 28, 2025 17:30
@matthewmcneely matthewmcneely enabled auto-merge (squash) April 28, 2025 17:30
@matthewmcneely
Copy link
Contributor Author

@ryanfoxtyler All conflicts sorted and tests passing....

@matthewmcneely matthewmcneely merged commit df9ca18 into main Apr 29, 2025
7 checks passed
@matthewmcneely matthewmcneely deleted the matthewmcneely/add-support-for-both-local-and-remote-clusters branch April 29, 2025 12:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants